/*
 * @Author: 吕佳伟
 * @Date: 2021-04-25 10:29:28
 * @LastEditors: 吕佳伟
 * @LastEditTime: 2021-07-03 21:33:27
 * @Description: file content
 */
///登录API数据解析类
///孙焰明创建
class LoginResponseData {
  final String status;
  final String token;
  final _Data data;

  // LoginResponseData(this.status, this.token, this.data);

  LoginResponseData.fromJson(Map<String, dynamic> json)
      : status = json['status'],
        token = json['token'],
        data = _Data.fromJson(json['data']);

  Map<String, dynamic> toJson() => <String, dynamic>{
        'status': status,
        'token': token,
        'data': data.toJson(),
      };
}

class _Data {
  final List<String> class_id;
  final String title;
  final String photo;
  final String role;
  final String entry_year;
  final String _id;
  final String name;
  final String user_id;
  final String org_name;
  final String email;
  final String subOrg_name;
  final String major_name;
  final List<dynamic> resources;
  final String org_id;

  _Data.fromJson(Map<String, dynamic> json)
      : class_id = (json['class_id'] as List).map((e) => e.toString()).toList(),
        title = json['title'],
        photo = json['photo'],
        role = json['role'],
        entry_year = json['entry_year'],
        _id = json['_id'],
        name = json['name'],
        user_id = json['user_id'],
        org_name = json['org_name'],
        email = json['email'],
        subOrg_name = json['subOrg_name'],
        major_name = json['major_name'],
        resources = json['resources'],
        org_id = json['org_id'];

  Map<String, dynamic> toJson() => <String, dynamic>{
        'class_id': class_id,
        'title': title,
        'photo': photo,
        'role': role,
        'entry_year': entry_year,
        '_id': _id,
        'name': name,
        'user_id': user_id,
        'org_name': org_name,
        'email': email,
        'subOrg_name': subOrg_name,
        'major_name': major_name,
        'resources': resources,
        'org_id': org_id,
      };
}
